/**
**************************************************************************************
*Founder Effect                                                                      *
*Copyright (C) 2006-2007, 5d Studios (www.5d-Studios.com)                            *
*                                                                                    *
*This library is free software; you can redistribute it and/or                       *
*modify it under the terms of the GNU Lesser General Public                          *
*License as published by the Free Software Foundation; either                        *
*version 2.1 of the License, or (at your option) any later version.                  *
*                                                                                    *
*This library is distributed in the hope that it will be useful,                     *
*but WITHOUT ANY WARRANTY; without even the implied warranty of                      *
*MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU                   *
*Lesser General Public License for more details.                                     *
*                                                                                    *
*You should have received a copy of the GNU Lesser General Public                    *
*License along with this library; if not, write to the Free Software                 *
*Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA      *
**************************************************************************************
*/
#pragma once
#include <stdlib.h>
#include <sstream>

#include "Commands.h"
//-------------
// Common Functions availible through the console


/**
========================
Exit the game
========================
*/
class Exit_f : public ICommand
{
public:
    Exit_f() { };
    void Exec(std::string &s);

    ~Exit_f() { };

};

/**
======================
Clear the console window
======================
*/
class Clear_f : public ICommand
{
public:
    Clear_f() {};
    void Exec(std::string &s);
    ~Clear_f() {};
};

/**
====================
Print to the console
====================
*/
class Echo_f : public ICommand
{
public:
    Echo_f() {};
    void Exec(std::string &s);
    ~Echo_f() {};
};

/**
====================
Execute a script file
====================
*/
class Exec_f : public ICommand
{
public:
    Exec_f();
    void Exec(std::string &file);

    ~Exec_f() {};
private:
    int ParseFile(std::string &file);

};


/**
===================
Set a cvar
==================
*/
class Set_f : public ICommand
{
public:
    Set_f() {};
    void Exec(std::string &s);

    ~Set_f() {};
};

/**
======================
Create a dynamic cvar
Used for scripting
======================
*/
//class Create_f : public ICommand
//{
//public:
//    Create_f() {};
//    void Exec(std::string &s);
//
//    ~Create_f() {};
//};



/**
=============================
Toggle logging
=============================
*/
class Log_f : public ICommand
{
public:
    Log_f() {};
    void Exec(std::string &s);

    ~Log_f() {};
};

/**
=============================
Display all the commands
=============================
*/
//class CmdList_f : public ICommand
//{
//public:
//    CmdList_f() {};
//    void Exec(std::string &s) {
//        // TODO
//    };
//
//    ~CmdList_f() {};
//};


/**
========================
Run a script
========================
*/
class Run_f : public ICommand
{
public:
    Run_f() {};
    void Exec(std::string &s);

    ~Run_f() {};
};